package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.system.domain.SysUserConfig;
import com.ruoyi.system.mapper.SysUserConfigMapper;
import com.ruoyi.system.service.ISysUserConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户设置Service业务层处理
 * 
 * @author WJH
 * @date 2022-08-02
 */
@Service
public class SysUserConfigServiceImpl extends ServiceImpl<SysUserConfigMapper, SysUserConfig>  implements ISysUserConfigService
{
    @Autowired
    private SysUserConfigMapper sysUserConfigMapper;

    /**
     * 查询用户设置
     * 
     * @param userId 用户设置主键
     * @return 用户设置
     */
    @Override
    public SysUserConfig selectSysUserConfigByUserId(Long userId)
    {
        return sysUserConfigMapper.selectSysUserConfigByUserId(userId);
    }

    /**
     * 查询用户设置列表
     * 
     * @param sysUserConfig 用户设置
     * @return 用户设置
     */
    @Override
    public List<SysUserConfig> selectSysUserConfigList(SysUserConfig sysUserConfig)
    {
        return sysUserConfigMapper.selectSysUserConfigList(sysUserConfig);
    }

    /**
     * 新增用户设置
     * 
     * @param sysUserConfig 用户设置
     * @return 结果
     */
    @Override
    public int insertSysUserConfig(SysUserConfig sysUserConfig)
    {
        return sysUserConfigMapper.insertSysUserConfig(sysUserConfig);
    }

    /**
     * 修改用户设置
     * 
     * @param sysUserConfig 用户设置
     * @return 结果
     */
    @Override
    public int updateSysUserConfig(SysUserConfig sysUserConfig)
    {
        return sysUserConfigMapper.updateSysUserConfig(sysUserConfig);
    }

    /**
     * 批量删除用户设置
     * 
     * @param userIds 需要删除的用户设置主键
     * @return 结果
     */
    @Override
    public int deleteSysUserConfigByUserIds(Long[] userIds)
    {
        return sysUserConfigMapper.deleteSysUserConfigByUserIds(userIds);
    }

    /**
     * 删除用户设置信息
     * 
     * @param userId 用户设置主键
     * @return 结果
     */
    @Override
    public int deleteSysUserConfigByUserId(Long userId)
    {
        return sysUserConfigMapper.deleteSysUserConfigByUserId(userId);
    }
}
